/*
 * fifoQueueHelper.h
 *
 *  Created on: Feb 8, 2010
 *      Author: diqiu
 */

#ifndef FIFOQUEUEHELPER_H_
#define FIFOQUEUEHELPER_H_


#endif /* FIFOQUEUEHELPER_H_ */

#include "SerialIO.h"	// For Packet data type

/* Enqueue a packet into a packet queue.
 * 	packet:	Packet to be enqueued
 * 	queue:	Pointer to the queue
 */
void enqueue(Packet packet, PacketQueue *packetQueue);

/* Dequeue a packet from a packet queue
 * 	packetQueue:	Pointer to the queue
 * Returns the packet dequeued
 */
Packet dequeue(PacketQueue *packetQueue);

/* Is the packet queue empty?
 * 	packetQueue:	Pointer to the queue
 * Returns 1 if queue is empty, 0 otherwise.
 */
int isQueueEmpty(PacketQueue *packetQueue);
